import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import {driver} from './driver'
Vue.use(VueRouter)

const routes = [
  ...driver,
  // PIM
  // 修改用户名页面
  {
    path: '/setun',
    name: 'Setun',
    component: () => import(/* webpackChunkName: "Setun" */ '../views/PIM/SetUserName.vue'),
    meta: {
      index: 0
    }
  },
  // 修改手机号码页面
  {
    path: '/setp',
    name: 'Setp',
    component: () => import(/* webpackChunkName: "Setphone" */ '../views/PIM/SetPhone.vue'),
    meta: {
      index: 0
    }
  },
  // 绑定支付设置
  {
    path: '/setpay',
    name: 'Setpay',
    component: () => import(/* webpackChunkName: "Setphone" */ '../views/PIM/SetWXAndZFB.vue'),
    meta: {
      index: 0
    }
  },
  // 用户设置页面
  {
    path: '/per',
    name: 'Per',
    component: () => import(/* webpackChunkName: "Per" */ '../views/PersonalInformation.vue'),
    meta: {
      index: -1
    }
  },



  // 主页
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      index: 0
    }
  },
  // 登录页
  {
    path: '/login',
    name: 'Login',
    component: () => import(/* webpackChunkName: "Login" */ '../views/Login.vue'),
    meta: {
      index: 1
    }
  },
  // 司机注册页面
  {
    path: '/dri_reg',
    name: 'dri_reg',
    component: () => import(/* webpackChunkName: "DriverRegister" */ '../views/register/DriverRegister.vue'),
    meta: {
      index: 2
    }
  },
  {
    path: '/dri_reg1',
    name: 'dri_reg1',
    component: () => import(/* webpackChunkName: "DriverRegister1" */ '../views/register/DriverRegister1.vue'),
    meta: {
      index: 3
    }
  },
  // 地图页面
  {
    path: '/map',
    name: 'Map',
    component: () => import(/* webpackChunkName: "Map" */ '../views/Map.vue'),
    meta: {
      index: 1
    }
  },
  // （模拟）支付页面----------------消失了，用不到了
  {
    path: '/pay',
    name: 'pay',
    component: () => import(/* webpackChunkName: "pay" */ '../views/Pay.vue'),
    meta: {
      index: 2
    }
  },
  // 确定订单页面
  {
    path: '/order',
    name: 'Order',
    component: () => import(/* webpackChunkName: "Order" */ '../views/ConfirmAnOrder.vue'),
    meta: {
      index: 3
    }
  },
  // 订单页面
  {
    path: '/indent',
    name: 'Indent',
    component: () => import(/* webpackChunkName: "Indent" */ '../views/Indent.vue'),
    meta: {
      index: 4
    }
  },
  // 公告栏页面
  {
    path: '/board',
    name: 'BulletinBoard',
    component: () => import(/* webpackChunkName: "BulletinBoard" */ '../views/BulletinBoard.vue'),
    meta: {
      index: 5
    }
  },
  {
    path: '/aaaaaa',
    name: 'aaaaaa',
    component: () => import(/* webpackChunkName: "Indent" */ '../views/aaaaaa.vue'),
    meta: {
      index: 6
    }
  },

]

const router = new VueRouter({
  routes
})

export default router
